package lgs

//自定义设置
type Custom struct {
	writeToFile int    //0默认,跟随上级设置,1false,2true
	title       string //句首标题

}

//新建自定义设置
func NewCustom(name string) *Custom {
	return &Custom{title: name}
}

//是否写入文件
func (this *Custom) WriteToFile(b bool) *Custom {
	if b {
		this.writeToFile = 2
	} else {
		this.writeToFile = 1
	}
	return this
}

//设置标题
func (this *Custom) SetTitle(s string) *Custom {
	this.title = s
	return this
}

//获取标题
func (this *Custom) getTitle() string {
	return this.title
}
